package com.haiyu.manager.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haiyu.manager.enums.OrderStatusEnum;
import com.haiyu.manager.enums.PayStatusEnum;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

@Data
@Table(name = "order1")
public class Order {
    @Column(name = "order_id")
    private String orderId;
    @Column(name = "service_time")
    private  String serviceTime;
    //private String buyerOpenid;
    @Column(name = "address_id")
    private int addressId;
    @Column(name = "order_amount")
    private BigDecimal orderAmount;
    @Column(name = "order_status")
    private Integer orderStatus = OrderStatusEnum.NEW.getCode();
    @Column(name = "pay_status")
    private Integer payStatus = PayStatusEnum.WAIT.getCode();
    @Column(name = "create_time1")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime1;
    @Column(name = "update_time1")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  updateTime1;
    @Column(name = "order_remark")
    private String orderRemark;
    @Column(name = "worker_id")
    private  String workerId;
    /*@Column(name = "worker_phone")
    private  String workerPhone;
    @Column(name = "worker_name")
    private  String workerName;*/
    @Column(name = "worker_remark")
    private  String workerRemark;
    @Column(name = "read")
    private Integer read;
    @Column(name = "sequence_id")
    private Integer sequenceId;
    //一对多关系
   // private Set<OrderDetail> orderDetails ;
    //private UserInfo userInfo;
    //private UserAddressinfo userAddressinfo;
}
